package com.woniu.dao;

import com.woniu.dto.ServiceCommentDTO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


import java.util.List;

public interface ServiceCommentMapper {

    @Select("select pu.mailbox mailBox,pu.nickname nickName,es.id,es.evalute,pp.payname payName,pp.payprice payPrice,pp.servicecontext context from person_user pu INNER JOIN evaluate_service es ON pu.id = es.userid INNER JOIN pp_payservice pp ON pp.id=es.serviceid order by es.id desc")
    List<ServiceCommentDTO> findByPage(@Param("currentPage") Integer currentPage,@Param("pageSize") Integer pageSize);

    @Delete("delete from evaluate_service where id = #{value}")
    void delComment(Integer id);

    List<ServiceCommentDTO> select(@Param("nickName") String nickName, @Param("payName") String payName);
}
